# /usr/bin/env python3.6
# -*- encoding: utf-8 -*-
"""
@File    : __init__.py.py
@Time    : 2020/2/5 0005 16:51
@Author  : zhangbing
@Email   : 18829172841@163.com
@Software: PyCharm
"""
from flask import Flask

from App.apis import movie_user_api, common_api, admin_user_api, cinema_client_api
from App.setting import envs
from .ext import ext_init


def create_app(env):
    app = Flask(__name__)
    app.config.from_object(envs.get(env))
    ext_init(app=app)
    movie_user_api.init_app(app)
    common_api.init_app(app)
    admin_user_api.init_app(app)
    cinema_client_api.init_app(app)
    return app


if __name__ == "__main__":
    pass
